$('#add').click(
    function(){
        window.location.href=`/Product/CreateOrUp`
    }
)
$('#quxiao').click(
    function(){
        window.location.href=`/Product/index`
    }
)
$('#save').click(
    function(){
        let id=$('[name=id]').val()
        let name=$('[name=name]').val()
        let Cname=$('[name=Cname]').val()
        let price=$('[name=price]').val()
        let num=$('[name=num]').val()
        let remarks=$('[name=Remarks]').val()
        let obj={
            id,
            name,
            Cname,
            price,
            num,
            remarks
        };
        
        $.post(`/Product/Save`,obj,function(res){
             console.log(res)
            window.location.href=`/Product/index`
            
        })
        
    }
)
function btnDel(id){
    window.location.href=`/Product/Delect/${id}`
}
function btnEdit(id) {
    window.location.href = `/Product/CreateOrUp/${id}`
  }
  